package com.hq.ims.platform.vo;

import com.hq.ims.data.vo.statistics.statisticsEnum.EnumDimension;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;


/**
 * @author 蒋柏平
 * @since 20241108
 */
@Mapper
public interface PlatformStatisticsMapstruct {

    PlatformStatisticsMapstruct INSTANCE = Mappers.getMapper(PlatformStatisticsMapstruct.class);

    //-------------------------------- 转换VO类 --------------------------------

    //-------------------------------- 以下为自定义类[输出对象] --------------------------------

    @ApiModel(value = "企业经营信息数量统计")
    @Data
    class CompanyBusiInfoCountStatisticsVo {

        @ApiModelProperty(value = "发布经营信息数量")
        private List<DateAndCountVo> publishBusiInfoCountList;

        @ApiModelProperty(value = "经营信息接收数量")
        private List<DateAndCountVo> receiveBusiInfoCountList;

    }

    @ApiModel(value = "用户反馈经营信息数量统计")
    @Data
    class UserBusiInfoCountStatisticsVo {

        @ApiModelProperty(value = "用户ID")
        private String userId;

        @ApiModelProperty(value = "用户姓名")
        private String userName;

        @ApiModelProperty(value = "金额")
        private BigDecimal money;

        @ApiModelProperty(value = "数量")
        private Integer count;

    }

    @ApiModel(value = "企业收益统计")
    @Data
    class CompanyEarningsMoneyStatisticsVo {

        @ApiModelProperty(value = "时间字符串")
        private String dateStr;

        @ApiModelProperty(value = "金额")
        private BigDecimal money;
    }

    @ApiModel(value = "通用时间和业量对象")
    @Data
    class DateAndCountVo {

        private String dateStr;

        private Integer count;

    }

    //-------------------------------- 以下为自定义类[输入对象] --------------------------------

    @ApiModel(value = "公司统计搜索VO")
    @Data
    class CompanyStatisticsSearchData {

        @NotNull(message = "时间类型不能为空")
        private EnumDimension dateType;

        private String orgId;
    }

    @ApiModel(value = "用户统计搜索VO")
    @Data
    class CompanyUserStatisticsSearchData {

        @NotNull(message = "时间类型不能为空")
        private EnumDimension dateType;

        private String orgId;

        private String userId;
    }


    //-------------------------------- springboot验证标识 --------------------------------

}
